﻿if exists (select * from sysobjects where id = object_id(N'pBUGLOGPriorityLevelAdd') and sysstat & 0xf = 4) drop procedure pBUGLOGPriorityLevelAdd 
GO

-- Creates a new record in the [dbo].[PriorityLevel] table.
CREATE PROCEDURE pBUGLOGPriorityLevelAdd
    @p_PriorityLevel varchar(25),
    @p_PriorityLevelDescription varchar(250),
    @p_PriorityID_out int output
AS
BEGIN
    INSERT
    INTO [dbo].[PriorityLevel]
        (
            [PriorityLevel],
            [PriorityLevelDescription]
        )
    VALUES
        (
             @p_PriorityLevel,
             @p_PriorityLevelDescription
        )

    SET @p_PriorityID_out = SCOPE_IDENTITY()

END

